package org.osomit.sacct.account.registry.iface;

import org.osomit.sacct.entity.ApplicationAccount;
import org.osomit.sacct.entity.ApplicationAccountRecord;
import org.osomit.sacct.entity.ApplicationAccountRecordSet;
import org.osomit.sacct.account.registry.impl.InMemoryAccountRegistry;

import java.util.List;

import com.google.inject.ImplementedBy;

/**
 * 
 * @author Jian Fang (John.Jian.Fang@gmail.com)
 *
 * Date: Jun 30, 2009
 *
 */
@ImplementedBy(InMemoryAccountRegistry.class)
public interface AccountRegistry {

    public void addAccount(String clientId, ApplicationAccount account);

    public void updateAccount(String clientId, ApplicationAccount account);

    public void deleteAccount(String clientId, String accountName);

    public void addAllAccounts(String clientId, List<ApplicationAccount> accounts);

    public ApplicationAccount getAccount(String clientId, String accountName);

    public List<ApplicationAccount> getAllAccounts(String clientId);

//    public void loadAccount(String key, ApplicationAccount account);

    public ApplicationAccountRecordSet getAccountRecordSet();

    public void clear();
}
